package springbootjedis.wqlbootjedis;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;

import org.springframework.data.redis.core.ValueOperations;
import springbootjedis.wqlbootjedis.entity.User;

@SpringBootTest
class WqlBootJedisApplicationTests002 {
    @Autowired
    private RedisTemplate redisTemplate;

    @Test
    public void test(){
        ValueOperations value = redisTemplate.opsForValue();
        value.set("k1",new User("只因",28,"北京"));
        System.out.println(value.get("k1"));
    }
    @Test
    public void test02(){
        HashOperations hash = redisTemplate.opsForHash();
        hash.put("k2","name","你好");
    }


}